package com.zjh.mybase.dao;

import com.zjh.mybase.config.SpringConfig;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Repository;

@Repository
@Data
public class UserDao {
    //获取自动装载的配置
    @Autowired
    private SpringConfig config;

    @Value("${nihao:yui}")
    private String str;

    public void index(){
        System.out.println("用户列表已经获取");
        System.out.println("值"+config.getVersion());
        System.out.println("值2:"+str);
    }
}
